from rest_framework import viewsets, permissions, mixins
import ability.permissions as pm
from ability.excepts import LogicException
import traceback
from ability.format import ErrorCode
from ability.models import Order
from study.utils import banned_val
from ability.serializer.order import OrdersSerializer

class Orders(viewsets.ReadOnlyModelViewSet):

  permission_classes = [pm.CustomIsAuthenticated, pm.AdminPermission|pm.TeacherPermission]
  serializer_class = OrdersSerializer
  queryset = Order.objects.all().order_by('-id')
